﻿using Microsoft.VisualBasic;
using System;
using System.Collections;
using System.Collections.Generic;
using System.Data;
using System.Diagnostics;


namespace XunPan.Web.Contents
{


	public class SiteInfo
	{

		private int _id;
		private string _name;
		private string _title;
		private Guid _uniqueID;
		private string _primaryDomain;
		private string _domain;
		private string _subDomain;
		private string _smtpServer;
		private int _databaseQuota;
		private bool _isDisplayed;

		private bool _enableTopicMenu;

		private int _userRegistration;
		//*********************************************************************
		//
		// ID Property
		//
		// The value of the identity column. 
		//
		//*********************************************************************

		public int ID {
			get { return _id; }
		}

		//*********************************************************************
		//
		// Name Property
		//
		// The name of this Portal. 
		//
		//*********************************************************************

		public string Name {
			get { return _name; }
		}
		//*********************************************************************
		//
		// Title Property
		//
		// The title of this Portal. 
		//
		//*********************************************************************

		public string Title {
			get { return _title; }
		}
		//*********************************************************************
		//
		// UniqueID Property
		//
		// The globally unique ID of this Portal. 
		//
		//*********************************************************************

		public Guid UniqueID {
			get { return _uniqueID; }
		}


		//*********************************************************************
		//
		// PrimaryDomain Property
		//
		// The domain used when sending emails and forming absolute URLs. 
		//
		//*********************************************************************

		public string PrimaryDomain {
			get { return _primaryDomain; }
		}

		//*********************************************************************
		//
		// Domain Property
		//
		// The domain name used for matching request for this Portal. 
		//
		//*********************************************************************

		public string Domain {
			get { return _domain; }
		}


		//*********************************************************************
		//
		// SubDomain Property
		//
		// The sub domain matched when making requests for this Portal. 
		//
		//*********************************************************************

		public string SubDomain {
			get { return _subDomain; }
		}

		//*********************************************************************
		//
		// SmtpServer Property
		//
		// The email server associated with this Portal. 
		//
		//*********************************************************************

		public string SmtpServer {
			get { return _smtpServer; }
		}

		//*********************************************************************
		//
		// DatabaseQuota Property
		//
		// The total file and image data that can be stored for this Portal. 
		//
		//*********************************************************************

		public int DatabaseQuota {
			get { return _databaseQuota; }
		}

		//*********************************************************************
		//
		// IsDisplayed Property
		//
		// Determines whether this Portal is displayed in the Communities menu. 
		//
		//*********************************************************************

		public bool IsDisplayed {
			get { return _isDisplayed; }
		}


		//*********************************************************************
		//
		// EnableTopicMenu Property
		//
		// Determines whether this Portal displays topics. 
		//
		//*********************************************************************

		public bool EnableTopicMenu {
			get { return _enableTopicMenu; }
		}

		//*********************************************************************
		//
		// EnableTopicMenu Property
		//
		// Determines whether this Portal displays topics. 
		//
		//*********************************************************************

		public int UserRegistration {
			get { return _userRegistration; }
		}

		//*********************************************************************
		//
		// PortalInfo Constructor
		//
		// Retrieves Portal info from a datarow. 
		//
		//*********************************************************************
		public SiteInfo(DataRow drow)
		{
			_id = Convert.ToInt32(drow["portal_ID"]);
			_uniqueID = (Guid)drow["portal_uniqueID"];
			_primaryDomain = Convert.ToString(drow["portal_primaryDomain"]);
			_domain = Convert.ToString(drow["portal_domain"]);
			_subDomain = Convert.ToString(drow["portal_subDomain"]);
			_smtpServer = Convert.ToString(drow["portal_smtpServer"]);
			_name = Convert.ToString(drow["portal_name"]);
			_title = Convert.ToString(drow["portal_title"]);
			_databaseQuota = Convert.ToInt32(drow["portal_databaseQuota"]);
			_isDisplayed = Convert.ToBoolean(drow["portal_isDisplayed"]);
			_enableTopicMenu = Convert.ToBoolean(drow["portal_enableTopicMenu"]);

			_userRegistration = Convert.ToInt32(drow["portal_userRegistration"]);
		}
		//New
	}
}
